<!-- 分配记录 - 客户 -->
<template>
  <dt-modal-info ref='info' :title='title' :width='60' @close='hide'>
    <dt-grid ref="table" :columns="columns" page :onFetch='onFetch' :height='500' />
  </dt-modal-info>
</template>

<script>
  import columnOpt from '../opt/columnsDetails.js'
  import customerMgr from '@/biz/customer/customer'
  export default {
    components: {},
    data() {
      return {
        columns: [],
        list: [],
        title: '客户',
        info: {},
        customerAssignData: {}
      }
    },
    methods: {
      show(val) {
        this.customerAssignData = val
        this.$refs.table.fetch()
        this.$refs.info.show()
      },
      hide() {
        this.$refs.table.clearFilter()
        this.$refs.info.hide()
      },

      onFetch(data) {
        console.log(data, '分配记录请求客户');
        return customerMgr.getDistributeLogPageDetails({
          page: data.current,
          rows: data.rows,
          buildingId: this.$dt.buildInfo().housesId,
          newUserId: this.customerAssignData.newUserId,
          oldUserId: this.customerAssignData.oldUserId,
          createDate: this.customerAssignData.createDate,
          customerName: data.customerName,
          customerPhone: data.customerPhone,
        })
      }
    },
    mounted() {
      this.columns = columnOpt.options(this, true)
    },
  }
</script>
<style lang='scss' scoped>
  .check_process_detail {
    .detail_title {
      padding: 10px 0 20px 0;
      display: flex;

      &_label {
        width: 70px;
      }

      &_conent {
        flex: 1;
      }
    }

    .process_node {
      .title_text {
        font-size: 16px;
        line-height: 32px;
      }
    }

    .table_node {
      margin: 10px 0;
    }
  }
</style>